/*
 * @Author: 徐建辰
 * @Date: 2022-05-25 09:49:30
 * @LastEditTime: 2022-05-25 15:26:21
 * @LastEditors: 徐建辰
 * @Description: 权限相关请求。包括角色、菜单、权限列表等
 */
import request from './request'
import {HTTP_URL} from '@/utils/constant'

// 获取全部角色列表
export const getAllRoles = params => request({
  url: `${HTTP_URL}/roleInfo/getRoleList`,
  params,
  hasload: 1
})

// 获取单个角色下的所有成员
export const getSingleRoleMembers = roleName => request({
  url: `${HTTP_URL}/roleInfo/InfoRole`,
  params: {roleName}
})

// 获取单个角色下的所有权限
export const getRoleAuths = roleId => request({url: `${HTTP_URL}/menuInfo/allMenuRole?roleId=${roleId}`})